-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shelter: handle missing data in addressSuggestion (DEV-1168) #804
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis PR fixes a bug where the shelter search box would break and the page would become blank when some inputs were used. The fix handles cases where Sequence diagram for address suggestion handling with missing datasequenceDiagram
participant User
participant AddressSuggestion
participant GooglePlacesAPI
User->>AddressSuggestion: Enter address text
AddressSuggestion->>GooglePlacesAPI: Request address suggestions
GooglePlacesAPI-->>AddressSuggestion: Return suggestion data
Note over AddressSuggestion: Check for missing main_text
Note over AddressSuggestion: Check for missing secondary_text
alt main_text is missing
AddressSuggestion-->>User: Return null (no suggestion shown)
else main_text exists
AddressSuggestion-->>User: Display formatted address suggestion
end
State diagram for address suggestion componentstateDiagram-v2
[*] --> CheckData
CheckData --> NullState: missing main_text
CheckData --> FormatAddress: has main_text
FormatAddress --> DisplaySuggestion: format complete
NullState --> [*]
DisplaySuggestion --> [*]
state FormatAddress {
[*] --> CheckSecondaryText
CheckSecondaryText --> UseMainText: has secondary_text
CheckSecondaryText --> UseDescription: no secondary_text
UseMainText --> [*]
UseDescription --> [*]
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tglaz - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on android and iphone. Can reproduce bug in other PRs, in this instance, the issue is gone. Pass.
[Shelter DB] In search box, some input break the whole page and becomes blank
https://betterangels.atlassian.net/browse/DEV-1168
Preview
https://shelter.dev.betterangels.la/address-bug
Summary by Sourcery
Bug Fixes: